import Vue from 'vue'
import App from './App.vue'
// 三级联动---全局组件

import TypeNav from "@/components/TypeNav"

//注册全局组件  


import Carousel from '@/components/Carousel';
import Pagination from '@/components/Pagination'
import router from '@/router';
import store from '@/store';
import {Button,MessageBox} from 'element-ui'
Vue.config.productionTip = false

Vue.component(TypeNav.name, TypeNav);
Vue.component(Carousel.name, Carousel);
Vue.component(Pagination.name, Pagination);
Vue.component(Button.name, Button)
// element-ui  注册，挂载在原型上
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
// 引入mockserver 
import '@/mock/mockServe'
// 引入swiper
import "swiper/css/swiper.css"
//  统一接收api文件里的全部请求函数
import * as API from '@/api';
//  引入懒加载插件
import VueLazyload from 'vue-lazyload';
import loadings from '@/assets/loadings.gif'
Vue.use(VueLazyload, {
   loading:loadings
})
//  引入表单校验插件
import '@/plugins/validate'
new Vue({
  render: h => h(App),
  beforeCreate() {
    // 全局事件总线$bus配置
    Vue.prototype.$bus = this;
    Vue.prototype.$API = API;
  },
  router,
 //注册 仓库
  store 
}).$mount('#app')
